package com.qidi.rabbit.demo;

import org.springframework.amqp.rabbit.annotation.RabbitHandler;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.stereotype.Component;
 

@Component
@RabbitListener(queues = "userQueue")
public class HelloReceiver {
 
	// 接受者
	@RabbitHandler
	public void process(User user) {
		System.out.println("Receiver object : " + user.getEmail());
	}

}
 
